﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ImobitechDao.Repositories
{
    public class PapelRepository : BaseRepository<Papel>, IPapelRepository
    {

        #region Implementação obrigatoria da classe base
        public PapelRepository(ImobitechEntities context) : base(context) { }

        protected override string TableName
        {
            get { return "Papel"; }
        }

        protected override string EntitySetName
        {
            get { return "Papel"; }
        }
        #endregion

        public Papel retornaPapel(string papel)
        {
            return (from p in _context.Papel
                    where p.Nome == papel
                    select p).First();
        }
    }
}